const path = require("path");
const name = "津安公司";

// const port = 9527

function resolve(dir) {
    return path.join(__dirname, dir);
}

module.exports = {
    publicPath: "./",
    outputDir: "dist",
    assetsDir: "static",
    lintOnSave: true,
    pluginOptions: {
        "style-resources-loader": {
            preProcessor: "less",
            patterns: [path.resolve(__dirname, "src/styles/variable.less")],
        },
    },
    devServer: {
        overlay: {
            warnings: false,
            error: false,
        },
        proxy: {
            "/api": {
                target: "http://test.kingforeyf.top:8090", //线上地址
                // target: "http://192.168.1.101:8090",
                pathRewrite: { "^/api": "" },
                ws: false,
                changeOrigin: true,
            },
        },
    },
    configureWebpack: {
        name: name,
        resolve: {
            alias: {
                // vue$: "vue/dist/vue.esm.js",
                "@": resolve("src"),
            },
        },
    },
};